import request from '@/utils/request'

// 查询工资编报
export function queryUnitSalaryReportPage(query) {
  return request({
    url: '/agencySalaryController/queryUnitSalaryReportPage',
    method: 'get',
    params: query
  })
}

export function generateFormula(agencyId) {
  return request({
    url: '/agencySalaryController/generateFormula',
    method: 'get',
    params: {
      agencyId
    }
  })
}

export function queryReallySendSalarySumAndPersonTotal(agencyId, queryThirteen) {
  return request({
    url: '/agencySalaryController/queryReallySendSalarySumAndPersonTotal',
    method: 'get',
    params: {
      agencyId,
      queryThirteen
    }
  })
}

export function querySubmitReallySendSalarySumAndPersonTotal(agencyId, queryThirteen) {
  return request({
    url: '/agencySalaryController/querySubmitReallySendSalarySumAndPersonTotal',
    method: 'get',
    params: {
      agencyId,
      queryThirteen
    }
  })
}

export function queryReallySendSalarySumTotal(params) {
  return request({
    url: '/agencySalaryController/queryReallySendSalarySumAndPersonTotal',
    method: 'get',
    params
  })
}

export function queryColumnName(params) {
  return request({
    url: '/agencySalaryController/queryColumnName',
    method: 'get',
    params
  })
}

export function querySalaryNameDict(params) {
  return request({
    url: '/agencySalaryController/querySalaryName',
    method: 'get',
    params
  })
}

export function submitData(data) {
  return request({
    url: '/agencySalaryController/submitUnitSalaryReportData',
    method: 'post',
    data: data
  })
}

export function submit(data) {
  return request({
    url: '/agencySalaryController/submitUnitSalaryReport',
    method: 'post',
    data
  })
}

export function submitOne(data) {
  return request({
    url: '/agencySalaryController/submitUnitSalaryReportOne',
    method: 'post',
    data
  })
}

export function rejectSubmit(data) {
  return request({
    url: '/agencySalaryController/rejectSubmitUnitSalaryReport',
    method: 'post',
    data
  })
}


export function rejectSubmitOne(data) {
  return request({
    url: '/agencySalaryController/rejectSubmitUnitSalaryReportOne',
    method: 'post',
    data
  })
}

export function rejectEdit(data) {
  return request({
    url: '/agencySalaryController/rejectEditUnitSalaryReport',
    method: 'post',
    data: data
  })
}

// 区划导出
export function outPutProvinceReportList(query) {
  return request({
    url: '/provinceController/outPutProvinceReportList',
    method: 'get',
    responseType: 'blob',
    params: query
  })
}

// 区划初始化导入
export function provinceImport(data) {
  const config = {
    'Content-Type': 'mutipart/form-data;boundary=' + new Date().getTime()
  }
  return request({
    url: '/provinceController/provinceImportSalaryReportList',
    type: 'upload',
    method: 'post',
    data,
    config
  })
}

// 导出
export function outPutSalaryReportList(query) {
  return request({
    url: '/outPutSalaryReportList',
    method: 'get',
    responseType: 'blob',
    params: query
  })
}

// 导入
export function Import(data) {
  const config = {
    'Content-Type': 'mutipart/form-data;boundary=' + new Date().getTime()
  }
  return request({
    url: '/ImportSalaryReportList',
    type: 'upload',
    method: 'post',
    data,
    config
  })
}

export function verfityExistNoFilePerson(agencyId) {
  return request({
    url: '/agencySalaryController/verfityExistNoFilePerson',
    method: 'get',
    params: {
      agencyId
    }
  })
}


//对比银行信息
export function JudgePersonBank(agencyId) {
  return request({
    url: '/agencySalaryController/JudgePersonBank',
    method: 'get',
    params: {
      agencyId
    }
  })
}

